package com.xxljob.demo.controller;

import com.xxljob.demo.dao.XxlJobGroupDao;
import com.xxljob.demo.service.TriggerCallbackThread;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2022/1/15 14:14
 */
@Controller
public class XxlJobTest {

    @Resource
    private XxlJobGroupDao xxlJobGroupDao;

    @Resource
    private TriggerCallbackThread triggerCallbackThread;

    @GetMapping(value = "/test")
    @ResponseBody
    public String getMessage() {
        triggerCallbackThread.start();
//        List<XxlJobGroup> groupList = xxlJobGroupDao.findByAddressType(0);
        return "Project YES";
    }

}
